{extend name="public:layout" /}
{block name='css'}
{/block}
{block name="content"}
<section class="Hui-article-box">
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户管理 <span
            class="c-gray en">&gt;</span> 用户列表<a class="btn btn-success radius r"
                                                 style="line-height:1.6em;margin-top:3px"
                                                 href="javascript:location.replace(location.href);" title="刷新"><i
            class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="Hui-article">
        <article class="cl pd-20">
            <div class="text-c text-right">
                <input type="text" class="input-text" style="width:250px" placeholder="输入用户昵称" id="key" value="{$key|default=''}">
                <button type="submit" onclick="onSelect()" class="btn btn-success radius" name=""><i
                        class="Hui-iconfont">&#xe665;</i>
                    搜用户
                </button>
            </div>
            <div class="mt-20">
                <table class="table table-border table-bordered table-hover table-bg table-sort">
                    <thead>
                    <tr class="text-c">
                        <th width="80">ID</th>
                        <th width="80">手机号</th>
                        <th width="80">邮箱</th>
                        <th width="80">昵称</th>
                        <th width="100">用户名</th>
                        <th width="90">头像</th>
                        <th width="70">状态</th>
                        <th width="100">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name='data' id='vo'}
                    <tr class="text-c">
                        <td>{$vo.id}</td>
                        <td>{$vo.phone}</td>
                        <td>{$vo.email}</td>
                        <td>{$vo.nickname}</td>
                        <td>{$vo.username}</td>
                        <td>{$vo.portrait}</td>
                        <td class="td-status"><span class="label label-{$vo.status == '启用'?'success':'error'} radius">{$vo.status}</span></td>
                        <td class="td-manage">
                            <a title="编辑" href="javascript:;" onclick="member_edit('编辑','/user/edit?id={$vo.id}','4','350','200')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>
                            <!--<a title="删除" href="javascript:;" onclick="member_del(this,'{$vo.id}')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>-->
                        </td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
            </div>
            {$data->render()}
        </article>
    </div>
</section>
{/block}

{block name='js'}
<script type="text/javascript">
    function onSelect() {
        let key = $("#key").val();
        location.href = '/user/index?key=' + key;
    }
    /*用户-编辑*/
    function member_edit(title, url, id, w, h) {
        layer_show(title, url, w, h);
    }
</script>
{/block}
